import App from './App'



const prePage = ()=>{
	let pages = getCurrentPages();
	let prePage = pages[pages.length - 2];
	// #ifdef H5
	return prePage;
	// #endif
	return prePage.$vm;
}
Vue.prototype.$prePage = {prePage};

const msg = (title, duration = 3000, mask = false, icon = 'none') => {
    //统一提示方便全局修改
    if (Boolean(title) === false) {
        return;
    }
	
    uni.showToast({
        title,
        duration,
        mask,
        icon
    });
}


Vue.prototype.$msg = msg;

import enums from '@/libs/enums.js'
Vue.prototype.$enums = enums;


import http from '@/libs/http.js'
Vue.prototype.$http = http;


import form from '@/libs/formValidation.js'
import formRules from '@/libs/fromRules.js'
Vue.prototype.$form = form;
Vue.prototype.$formRules = formRules;


// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif